This module provides regular expression matching operations similar to those found in Perl. Both patterns and strings to be searched can be Unicode strings.
In match statement, strings are compared using == operator which means that case patterns must be exactly equal to the match expression( mystring in this case).
The search() Function. The search() function searches the string for a match, and returns a Match object if there is a match. Python PIP · Try it Yourself · Try it